home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mfs055 / minit.doc < prev    next >
Text File  |  1991-11-29  |  8KB  |  113 lines

  1. Minit is a minix filesystem initialiser. It behaves like a very cut down
  2. version of 'mkfs'. A TOS disk or hard drive partition can be turned into
  3. a minix partition or disk simply by doing a 'minit A:' or whatever drive
  4. you want the filesystem on. NB THIS WILL TOTALLY AND IRRETRIEVABLY WIPE
  5. THE DRIVE YOU SELECT. If you want to experiment try it on floppies before
  6. comitting your hard disk.
  7.  
  8.     This is all very well , however if you try to access a minix
  9. partition without MiNT or minix.xfs present then TOS will quite happily
  10. write all over it and probably trash it. There are two ways round this and
  11. that is what the -Z and -P options are for. With neither of these options 
  12. the filesystem looks like a TOS filesystem to GEMDOS and can be trashed.
  13. With the -Z option several BPB entries are zeroed which confuses GEMDOS and
  14. makes it leave the filesystem alone. Actually some versions of GEMDOS will
  15. lock up when they meet such a disk , however this is what mkfs under Minix
  16. itself does. Unfortunately some versions of hard disk driver software will
  17. refuse to access such a partition making minix.xfs unable to access the
  18. partition and worse still making it impossible for most disk editors to
  19. alter it either !! You should be OK with floppies and -Z though. The -P
  20. option is a bit more subtle, it makes the disk look like a valid TOS
  21. partition with a full root directory , any attempt to write to the drive
  22. fails because it can't create a new filename, also the name 'MINIXFS' is
  23. shown when checking the volume name of the drive in question under GEMDOS
  24. (i.e. no minix.xfs running), this should make it impossible for GEMDOS to
  25. normally write to the partition, but since it looks like a TOS partition
  26. all driver software should be happy. For this reason the '-P' option is
  27. recommended unless you are sure your driver software will tolerate '-Z'
  28. (ICD software does , AHDI does NOT ). If you want to change an already existing
  29. filesystem to this '-P' form use the '-p' option , this shouldn't harm an 
  30. already existing Minix partition or a TOS one (which it will refuse to change)
  31. but just in case it still puts up the warning and requires confirmation.
  32.  
  33.     A question which arises is: how do you get minix.xfs to read an already
  34. existing minix partition if your driver software doesn't like the zeroed
  35. BPB which is the default for Minix mkfs? Currently you have two options ,
  36. borrow some other driver software that works in your setup and do a 
  37. 'minit -p' on the unreadable partitions, or compile the 'fixup.c' program 
  38. provided under Minix , then simply do a 'fixup /dev/hd2' or whatever under
  39. Minix. Note also that the method used in '-P' will only work with 512 byte
  40. sectors , you can force 'fixup' to change the sector size for you but this
  41. means that the 'auto' value for 'minit' will no longer work and you will
  42. need to pass the number of blocks in the filesystem manually to minit with
  43. the '-b' option, if you should want to reinitialise the partition with minit.
  44. Currently 'minit' will refuse the '-P' or '-p' options on partitions which
  45. don't have 512 byte sectors.
  46.  
  47.     One potential snag with all methods is if you use a very early version
  48. of 'mkfs' under minix. Version 1.1 zeroed the whole boot sector of the minix
  49. partition. This is very bad news indeed , and will probably make such a minix
  50. partition inaccessbile to *any* driver software. The best thing to do is to
  51. restore the partition to TOS (if your hard disk software allows you to restore
  52. single partitions) and use 'minit -P' to initialise the partition , then
  53. restore the partition from backup , alternatively you could use a later mkfs
  54. followed by the 'fixup' program supplied. A quick and dirty solution is to copy
  55. the boot sector from another TOS partition , preferably one the same size , 
  56. under minix a suitable command to do this is :
  57. dd if=/dev/hd1 of=/dev/hd3 count=1
  58. where 'hd1' is the TOS partition and 'hd3' is the (unreadable) minix partition,
  59. then if your driver will tolerate the partitions now (and if it wont please
  60. let me know), do a minit -p on the relevant partitions , or fixup if you prefer,
  61. so that the partitons are protected. 
  62.  
  63.     The '-V' option creates a V2 filesystem , this is the new alternative
  64. Minix filesystem format which has a couple of advantages over the old one.
  65. If you have Minix you will need to patch it up to 1.6xxxx to recognise V2.
  66. First it supports the atime,mtime,ctime fields whereas the old V1 system only
  67. supports mtime. Also it uses longs for block references, this theoretically
  68. makes it possible to have *very* large filesystems without the need to bump
  69. up the sector size in the manner AHDI has to with BGM partitions. There is a
  70. snag however , many kinds of partitioning software will not permit you to
  71. have very big partitions without a large sector size , what you do here depends
  72. on the driver software , you could try modifying the sector size in the boot
  73. sector of such a partition. However there is no way for 'minit' to recognise
  74. the size of huge partitions so you will have to manually pass the number of
  75. blocks to 'minit' with the '-b' option. Also your driver software must support
  76. the 'extended Rwabs' system call to work properly under such circumstances,
  77. AHDI 3.1 and later does and later ICD software also does , if in doubt try the
  78. '-t' option with 'minit' on an arbitrary GEM partition of your hard disk , 
  79. this just checks for the 'extended Rwabs' by saying if the extra 'Lrecno'
  80. parameter is present or not. If 'Lrecno' is not supported you can't use huge
  81. filesystems , try with a newer version of the disk software.
  82.  
  83.     minix.xfs version 0.52 and later supports V2 filesystems . Note
  84. however that I don't have the facilities to check large filesystems and
  85. mine are all < 16 Mb so this facility is entirely untested. I would be
  86. very grateful if someone would try making large V2 filesystems and filling
  87. them up to see if minix.xfs copes OK.
  88.  
  89.     Finally the '-n' option. This is a bit experimental at present. 
  90. Quite often filenames get truncated so that 14 characters mixed case isn't
  91. enough. So what I've done is to increase the directory entry size and make
  92. version 0.53 and above of the filesystem automatically sense it and act
  93. accordingly. What this means is that if you use the '-n' option then the
  94. maximum filename size increases from 14 to 16*d-2, where 'd' is the number
  95. following the '-n' option. d must be a power of two and lie between 1 and
  96. 16 (inclusive). 1 is normal and is the default. With 2 you get 30 character
  97. filenames which should be enough for most applications. When minix.xfs
  98. is compiled the option MAX_INCREMENT specifies the largest value for the
  99. increment (that is the number following '-n' to minit) that can be handled.
  100. You should note that TOS specifies a maximum path name length of about 128 
  101. characters (64 for early versions of TOS) and so programs may well expect
  102. pathnames to be smaller than this . As a result making the increment bigger
  103. than say 4 is not a good idea.
  104.  
  105. NBB Minix itself does ***NOT*** recognise these larger filename filesystems
  106. and will be very confused by them. It may be possible to persuade Minix to
  107. tolerate bigger filenames by altering the relevant parameters in the directory
  108. structure and recompiling everything in sight (libraries , fs , kernel , mm and
  109. all the tools). However this will then mean it wont handle  the original
  110. filesystem type and be confused by that ... However you could just recompile
  111. a few useful tools like fsck to repair the long filename filesystems. Note,
  112. at this time I haven't tried this !
  113.